package cn.edu.cuit.elena.web.service;

public class AppSQL
{
    /**
     * User Management.
     * */
    public enum UMSQL
    {
        ALL_USER_GROUPS( "select c.usergroup, d.username, d.gender from elena.usergroup c left join elena.user d on c.usergroup = d.usergroup;" ), 
        USER_GROUP_BY_ID( "select c.usergroup, d.username, d.gender from elena.usergroup c left join elena.user d on c.usergroup = d.usergroup where c.usergroup = ?;" ), 
        ALL_USERS("select  username , gender ,usergroup ,comments from elena.user;" ), 
        USER_BY_ID( "select username , gender ,usergroup ,comments  from elena.user where username = ?;" );

        String sql;

        UMSQL(String sql)
        {
            this.sql = sql;
        }

        public String sql()
        {
            return sql;
        }
    }
}
